#coding=utf-8

from imbox import Imbox
import keyring

password=keyring.get_password('yagmail','2509570379@qq.com')

with Imbox('imap.qq.com','2509570379@qq.com',password,ssl=True) as imbox:
    all_index_messages=imbox.messages()
    for uid,message in all_index_messages:
        print('-------------------------------')
        print(message.subject)
        print(message.body['plain'])
        print(message.date)
        print(message.body['html'])
        print(message.attachments)
